from rest_framework import serializers

from products.models import Products, AsinCompare


class ProductsSetSerializer(serializers.ModelSerializer):
    class Meta:
        model = Products
        fields = "__all__"


class ASINSerializer(serializers.ModelSerializer):
    class Meta:
        model = AsinCompare
        fields = "__all__"


class ListProductSerializer(serializers.ModelSerializer):
    products_set = ProductsSetSerializer(many=True)
    class Meta:
        model = Products
        fields = "__all__"
        depth = 1

